<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'da.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="content-type" content="text/html;charset=utf-8">

<link rel="stylesheet" href="js/easyui/demo/demo.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/default/easyui.css"
	type="text/css"></link>
<script type="text/javascript" src="js/easyui/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="script/common.js"></script>
<script type="text/javascript" src="js/easyui/themes/easyui-lang-zh_CN.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">

</style>
<script type="text/javascript">
	/**
	 *打开部件选择
	 */	
	function addPart(){
	
		$("#productPart").window('open');
	
	}
	
   function choosePart(partId){
  		var row = $('#partList').datagrid('getSelected');
  		if (row){
  			$('#partShow').datagrid('appendRow',{
				partCode: row.partCode,
				productCode:row.productCode,
				photo:row.photo,
				partName:row.partName,
				价格:'<input name="" type="test"/>',
				
				});
  		}
  }

</script>
</head>

<body>
	<div style="display: none;">
		<!-- 产品信息  -->
		<div id="productPart" class="easyui-window" title="部件选择" collapsible="false" minimizable="false" maximizable="false" closed="true"  modal="true"
			 style="width:700px; padding: 10px 30px;" href="ppartgetpart"> 
		</div>
	</div>
	<div>
		<form action="cpaddCostcheckProduct" id="saveform" method="post">
			<div>
				<a onclick="addPart()" class="easyui-linkbutton" id="addPart" >添加部位</a>	
			</div>
			<table id="partShow" class="easyui-datagrid" style="width:50%;" singleSelect="true">
				<thead>
					<tr>
						<th data-options="field:'code'" width="">序号</th>
						<th data-options="field:'partCode'">部位编码</th>
						<th data-options="field:'productCode'">参考产品编码</th>
						<th data-options="field:'photo'">图示</th>
						<th data-options="field:'partName'">工艺部位类型</th>
						<th data-options="field:'sizeRange'">尺寸范围</th>
						<th data-options="field:'totalPrice'">部件价格</th>
						<th data-options="field:'memo'">备注</th>
						<th data-options="field:'价格'" width="120px;">价格</th>
					</tr>
				</thead>
					
			</table>	
			<div style="display:none;">
				<input name="" value="${chId }" />
			</div>
		</form>
	</div>
</body>
</html>
